<style>
    .layui-form-switch {
        position: relative;
        height: 22px;
        line-height: 22px;
        min-width: 35px;
        padding: 0 5px;
        margin-top: 8px;
        border: 1px solid #d2d2d2;
        border-radius: 20px;
        cursor: pointer;
        background-color: #fff;
        -webkit-transition: .1s linear;
        transition: .1s linear;
        width: 50px;

    }
    .layui-form-onswitch {
        border-color: #5FB878;
        background-color: #5FB878;
        width: 50px;
    }
    .layui-form-onswitch i {
        left: 100%;
        margin-left: -21px;
        background-color: #fff;
    }
</style>
<form action="{:url()}" method="post" class="form_single">
    <div class="box">
      <div class="box-body">
        <div class="row">
          <div class="col-md-6">
            <div class="form-group">
              <label>老师名字</label>
              <span class="">（老师名字）</span>
              <input class="form-control" name="name" placeholder="请输入老师名字" value="{$info['name']|default=''}" type="text">
            </div>
          </div>


          <div class="col-md-6">
            <div class="form-group">
                <label>老师简介</label>
                <span class="">（老师简介）</span>
                <textarea class="form-control" name="intro" rows="3" placeholder="请输入老师简介">{$info['intro']|default=''}</textarea>
            </div>
          </div>



            <div class="col-md-6">
                <div class="form-group">
                    <label>身份职业</label>
                    <span class="">（身份职业）</span>
                    <input class="form-control" name="identity" placeholder="身份职业" value="{$info['identity']|default=''}" type="text">
                </div>
            </div>

            <div class="col-md-6">
                <div class="form-group">
                    <label>老师头像</label>
                    <span class="">（请上传老师头像）</span>
                    <br/>
                    {assign name="cover_id" value="$info.cover_id|default='0'" /}
                    {:widget('file/index', ['name' => 'cover_id', 'value' => $cover_id, 'type' => 'img'])}
                </div>
            </div>


            <!--<div class="col-md-6">-->
            <!--<div class="form-group">-->
                <!--<label>多图片</label>-->
                <!--<span class="">（请上传多图片）</span>-->
                <!--<br/>-->

                <!--{assign name="img_ids" value="$info.img_ids|default=''" /}-->
                <!--{:widget('file/index', ['name' => 'img_ids', 'value' => $img_ids, 'type' => 'imgs'])}-->

            <!--</div>-->

          </div>



      </div>

        <div class="row">




        </div>
        
      <div class="box-footer">
          
        <input type="hidden" name="id" value="{$info['id']|default='0'}"/>
        
        {include file="layout/edit_btn_group"/}
        
      </div>
        
      </div>
      </div>
</form>

<script>
    $('.onkey').click(function () {
        $(this).hide();
        $(this).next().show();
        $("input[name='"+$(this).attr('data-code')+"']").val(0);
    })
    $('.offkey').click(function () {
        $(this).hide();
        $(this).prev().show();
        $("input[name='"+$(this).attr('data-code')+"']").val(1);

    })

    function changevideo(v) {
        if(v==1){
            $('#video').show();
            $('#video_url').hide();
        }else{
            $('#video_url').show();
            $('#video').hide();
        }
    }
</script>